package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.CheckStatus;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.YgAgent;
import com.ygqh.baby.po.YgAgentExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface YgAgentMapper {
	int countByExample(YgAgentExample example);

	int deleteByExample(YgAgentExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgAgent record);

	int insertSelective(YgAgent record);

	List<YgAgent> selectByExample(YgAgentExample example);

	YgAgent selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgAgent record, @Param("example") YgAgentExample example);

	int updateByExample(@Param("record") YgAgent record, @Param("example") YgAgentExample example);

	int updateByPrimaryKeySelective(YgAgent record);

	int updateByPrimaryKey(YgAgent record);

	int countSuper(@Param("nickName") String nickName, @Param("userName") String userName, @Param("checkStatus") CheckStatus checkStatus,
			@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("orderStartDate") Date orderStartDate,
			@Param("orderEndDate") Date orderEndDate);

	YgAgent findAgentInfo(@Param("id") Long id);

	List<YgAgent> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("nickName") String nickName, @Param("userName") String userName,
			@Param("checkStatus") CheckStatus checkStatus, @Param("startDate") Date startDate, @Param("endDate") Date endDate,
			@Param("orderStartDate") Date orderStartDate, @Param("orderEndDate") Date orderEndDate);

	List<YgAgent> findAgentByTime(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("checkStatus") CheckStatus checkStatus);

	int countByUserAgentReport();

	List<Map<String,Object>> selectByByUserAgentReport(@Param("queryInfo") QueryInfo queryInfo);
}